<?php
/**
 * Created by PhpStorm.
 * User: lizx
 * Date: 2018/3/22
 * Time: 17:57
 */

namespace app\api\service;

use app\common\Service;

class ShippingService extends Service
{
    public function getTimeStr($time)
    {
        $day = substr($time,0,10);
        $today = date('Y-m-d');
        $tomorrow = date('Y-m-d',strtotime('+1 day'));
        $tomorrow2 = date('Y-m-d',strtotime('+2 day'));

//        $hour = substr($time,11,2);
//        $minute = substr($time,14,2);

        if($day == $today){
            $str = '';
        }elseif($day == $tomorrow){
            $str = '明天';
        }else{
            $str = '后天';
        }

        return $str . substr($time,11,5);
    }
}